<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>info</title>
    <script>
        function toEdit(id) {
            if (id == undefined || id == null) {
                alert("未选择!");
                return;
            }
            window.location.href = '/toEdit/' + id;
        }

        function del(id) {
            if (id == undefined || id == null) {
                alert("未选择!");
                return;
            }
            window.location.href = '/del/' + id;
        }

        function FName() {
            var FName = document.getElementById('FName').value;
            location.href = '/findAll?FName=' + FName;
        }

        window.onload = function () {
            <#if ids != ''>
                alert('${ids}');
            </#if>
        };
    </script>
</head>
<body>
<table align="center" border="1px" cellpadding="0px" cellspacing="0px" width="40%">
    <tr>
        <th>姓名</th>
        <th>日期</th>
        <th>是否上门</th>
        <th>来源</th>
        <th>年级</th>
        <th>操作</th>
    </tr>
        <#list list as l>
            <tr align="center">
                <td>${l.name}</td>
                <td>${l.date}</td>
                <td>${l.shangmen}</td>
                <td>${l.laiyuan}</td>
                <td>${l.nianji}</td>
                <td><a href="javascript:;" onclick="toEdit(${l.id})">修改</a>&nbsp;&nbsp;<a href="javascript:;"
                                                                                          onclick="del(${l.id})">删除</a>
                </td>
            </tr>
        </#list>
    <tr align="center">
        <td colspan="6"><input placeholder="输入姓名" id="FName" type="text" name="FName">&nbsp;&nbsp;<a href="javascript:;"
                                                                                                     onclick="FName()">搜索</a>
        </td>
    </tr>
    <tr align="center">
        <td colspan="6"><a href="/toAdd">添加</a></td>
    </tr>
</table>
</body>
</html>